package chapter1;

public class DIexample1 {

	public static void main(String[] args) {
		Sortware sortware = new MusicPlayer();
		OS os = new OS(sortware);
		os.installSortware();
	}

}

class MusicPlayer implements Sortware{
	@Override
	public void install(){
		System.out.println("MusicPlayer is installing");
	}
}

class OS{
	Sortware sortware;
	
	public OS(Sortware sortware) {
		this.sortware = sortware;
	}
	
	public void installSortware() {
		sortware.install();
	}
}